//
//  BSCategoryUserListViewModel.m
//  sister
//
//  Created by 周冰烽 on 2017/2/15.
//  Copyright © 2017年 周冰烽. All rights reserved.
//

#import "BSCategoryUserListViewModel.h"

@implementation BSCategoryUserListViewModel

-(NSInteger)rowNumber{
    return self.userList.count;
}
-(NSString *)headerImg:(NSInteger)index{
    return self.userList[index].header;
}
-(NSInteger)uid:(NSInteger)index{
    return self.userList[index].uid;
}
-(BOOL)isVip:(NSInteger)index{
    return self.userList[index].isVip;
}
-(NSString *)introduction:(NSInteger)index{
    return self.userList[index].introduction;
}
-(NSInteger)isFollow:(NSInteger)index{
    return self.userList[index].isFollow;
}
-(NSInteger)fansCount:(NSInteger)index{
    return self.userList[index].fansCount;
}
-(NSInteger)gender:(NSInteger)index{
    return self.userList[index].gender;
}
-(NSInteger)tieziCount:(NSInteger)index{
    return self.userList[index].tieziCount;
}
-(NSString *)screenName:(NSInteger)index{
    return self.userList[index].screenName;
}
-(NSMutableArray<BSCategoryUserListData *> *)userList{
    if (_userList == nil) {
        _userList = [NSMutableArray<BSCategoryUserListData *> new];
    }
    return _userList;
}
-(void)getIDUserListWithA:(NSString *)a c:(NSString *)c categoryID:(NSInteger)categoryID completionHandler:(void (^)(NSError *))completionHandler{
    [BSNetManager ByLeftUserListWithA:a c:c CategoryID:categoryID completionHandler:^(BSCategoryUserListModel *model, NSError *error) {
        [self.userList removeAllObjects];
        [self.userList addObjectsFromArray:model.list];
        completionHandler(error);
    }];
}
@end
